package com.lianxi.Courses.service;

import com.github.pagehelper.PageInfo;
import com.lianxi.Courses.entity.Comment;
import com.lianxi.Courses.entity.Praise;
import com.lianxi.Courses.exception.PraiseErrorException;
import com.lianxi.Courses.exception.RequestParameterErrorException;

import javax.servlet.http.HttpSession;

/**
 * 翔哥
 * 2025年10月13日
 */
public interface CommentService {

    //找
    PageInfo<Comment> findPage(Comment commentParam, String pageNo, String pageSize);

    //启用和通过
    void enableById(String id) throws RequestParameterErrorException;
    //禁用
    void disableById(String id) throws RequestParameterErrorException;
    //根据资源id查询评论
    PageInfo<Comment> findByResourceId(String resourceId, String pageNo, String pageSize) throws RequestParameterErrorException;
    void modifyStatus(String id,String status) throws RequestParameterErrorException;

    //评论
    void insertComment(String userId,String context,String resourceId) throws RequestParameterErrorException;

    //点赞
    void addLike(String userId,String commentId) throws RequestParameterErrorException, PraiseErrorException;

    Praise findPraise(String userId ,String commentId) throws RequestParameterErrorException;
}
